# Maintainer: Renato Silva <br.renatosilva@gmail.com>

_realname='git-bzr-ng'
pkgname="${_realname}-git"
pkgver=r61.9878a30
pkgrel=1
pkgdesc='Bi-directional Git-to-Bzr bridge'
url='https://github.com/termie/git-bzr-ng'
license=(BSD)
arch=(any)

source=('git+https://github.com/termie/git-bzr-ng')
depends=(python2 git bzr bzr-fastimport)
provides=(${_realname})
conflicts=(${_realname})
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_realname}"
    printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

prepare() {
    cd "${srcdir}/${_realname}"
    sed -i 's/ python$/ python2/' git-bzr
}

package() {
    cd "${srcdir}/${_realname}"
    install -Dm755 git-bzr "${pkgdir}/usr/lib/git-core/git-bzr"
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE"
}
